

package com.hazelcast.nio.serialization;

import com.hazelcast.nio.ObjectDataInput;

import java.io.IOException;

/**
 * This interface allows deserialization of a binary data with a provided class type.
 */
@FunctionalInterface
@SuppressWarnings("JavadocType")
public interface TypedStreamDeserializer<T> {
    /**
     * Reads object from objectDataInputStream
     *
     * @param in     ObjectDataInput stream that object will read from
     * @param aClass The class to use for de-serialization
     * @return read object
     * @throws IOException in case of failure to read
     */
    T read(ObjectDataInput in, Class aClass) throws IOException;
}
